package demo01;

import java.util.ArrayList;
import java.util.List;

public class ConcreteAggregate extends Aggregate {
    private List<Object> items=new ArrayList<>();

    public ConcreteAggregate() {
    }

    public ConcreteAggregate(List<Object> items) {
        this.items = items;
    }

    @Override
    public Iterator CreateIterator() {
        return new ConcreteIterator(this);
    }
    public int Count(){
        return items.size();
    }
}
